<?php /* Smarty version Smarty-3.1.13, created on 2013-07-02 07:11:31
         compiled from ".\templates\itemImage.tpl" */ ?>
<?php /*%%SmartyHeaderCode:27174517f47b9a3a039-28960177%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1629a688302128d2724d5b30469c7f193c3c36df' => 
    array (
      0 => '.\\templates\\itemImage.tpl',
      1 => 1368879736,
      2 => 'file',
    ),
    '9d3840acd837a27297ba054f8bc546ea8525850a' => 
    array (
      0 => 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\hirenbhai\\templates\\main.tpl',
      1 => 1372739455,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '27174517f47b9a3a039-28960177',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_517f47b9c73998_82226323',
  'variables' => 
  array (
    's_activId' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_517f47b9c73998_82226323')) {function content_517f47b9c73998_82226323($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\hirenbhai\\include\\smarty\\libs\\plugins\\function.html_options.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<title>!! HIRENBHAI !!</title>
<link rel="stylesheet" type="text/css" href="./css/main.css" />
<link rel="stylesheet" type="text/css" href="./css/style.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/style1.css" media="screen">
	<style type="text/css">
		html, body { margin: 0;	padding: 0; }
		ul.menu { margin: 0px auto 0 auto; }
	</style>
	</head>

<script type="text/javascript">
 $(document).ready(function() {
	$(".add").blur(function()
	{
	  if($(".add:last").val() != '' && $(".add:last").val() > 0)
	  {
      $("#one").clone(true).appendTo("#mainDiv")
      .find('input[type="text"]').val('').end()
      .find('select[option=""]').val('');
      var rowCount = $('#mainDiv tr').length;
      $(".srno:last").val(rowCount);
    }
  });
});
function itemAjax(itemVal)
{
	var row = $(itemVal).parents('.one');
	var dataString = "itemVal=" + itemVal
  $.ajax({
	  type: "GET",
	  url: "ajaxRisponceItem.php",
	  data: dataString,
	  success:function(data)
	  {
	  	$('.sizeGet:last').html(data);
    }
  });
}

function sizeAjax(sizeVal)
{
	var row = $(sizeVal).parents('.one');
  var itemVal = $('.itemSelect:last').val();
  var dataString = 'sizeVal='+sizeVal + '&itemVal=' + itemVal;
  $.ajax({
	  type: "GET",
	  url: "ajexResponceSize.php",
	  data: dataString,
	  success:function(data)
	  {
	  	$('.companyGet:last').html(data);
    }
  });
}

function companyAjax(companyVal)
{
  var row = $(companyVal).parents('.one');
	var itemVal = $(".itemSelect:last").val();
	var sizeVal = $(".sizeSelect:last").val();
	var dataString = 'companyVal='+companyVal + '&itemVal=' + itemVal + '&sizeVal=' + sizeVal ;
	$.ajax({
	  type: "GET",
	  url: "ajaxRisponceIcompany.php",
	  data: dataString,
	  success:function(data)
	  {
	  	$('.qualitySelect:last').html(data);
    }
  });
}

function qualityAjax(qualityVal)
{
    var row = $(qualityVal).parents('.one');
  	var itemVal = $(".itemSelect:last").val();
  	var sizeVal = $(".sizeSelect:last").val();
  	var companyVal = $(".companySelect:last").val();
  	var dataString = 'qualityVal='+qualityVal+'&companyVal='+companyVal + '&itemVal=' + itemVal + '&sizeVal=' + sizeVal ;
  	$.ajax({
	  type: "GET",
	  url: "ajaxResponceQuality.php",
	  data: dataString,
	  success:function(data)
	  {
	  	$('.colorSelect:last').html(data);
    }
  });
}
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
  {
	  return true;
  }
  else
  {
	  return false;
  }
}
</script>



<?php if (strlen($_smarty_tpl->tpl_vars['s_activId']->value)>0){?>
<div id="headerContent">
  <div id="headingData"><br>
    <a href="bill.php"></a>
  </div>
</div>
<body>
  <ul class="menu">
    <li><a href="#"> Master</a>
      <ul>
        <li><a href="item.php" align="left"> Item</a></li>
        <li><a href="size.php"  align="left">Size</a></li>
        <li><a href="company.php"  align="left">Company</a></li>
        <li><a href="quality.php"  align="left">Quality</a></li>
        <li><a href="itemCreate.php"  align="left">Color</a></li>
        <li><a href="itemImage.php"  align="left">Item Image</a></li>
        <li><a href="transaction.php"  align="left">Transaction</a></li>
      </ul>
    </li>
    <li><a href="party.php">Party</a><li>
    <li><a href="partyType.php">Transaction</a><li>
    <li><a href="order.php"> Order</a><li>
    <li><a href="orderlist.php"> Order List</a><li>
    <li><a href="bill.php">Bill</a></li>
    <li><a href="logout.php">Logout</a><li>
  </ul>
</body>
<?php }?>

<form name="party" action="<?php echo $_SERVER['PHP_SELF'];?>
" method="post" enctype="multipart/form-data">
<table align="center" border="1" cellpadding="2" cellspacing="2" width="" >
  <tr>
    <th class="table2">Sr No</th>
    <th class="table2">Item</th>
    <th class="table2">Size</th>
    <th class="table2">Company</th>
    <th class="table2">Quality</th>
    <th class="table2">Color</th>
    <th class="table2">Image</th>
  </tr>
  <tbody id="mainDiv">
<!--===========Item Select box ===============-->	
    <tr id="one" class="oneClass">
      <td><input type="text" name="srno[]" id="srno[]" class="srno" size="3" value="1" disabled />
      </td>
      <td align="center" class="table2">
	      <select name="itemId[]" class="itemSelect" onchange="itemAjax(this.value)" autofocus="autofocus">
	        <option value="0">Select Item</option>
	        <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['itemArray']->value['itemId'],'output'=>$_smarty_tpl->tpl_vars['itemArray']->value['itemName']),$_smarty_tpl);?>

        </select>
      </td>
<!--===========Size Select box ===============-->
      <td align="center" class="table2">
        <select name="sizeId[]" class="sizeSelect sizeGet" onchange="sizeAjax(this.value)">
      	  <option value="0">Select Size</option>
        </select>
      </td>
<!--===========Company Select box ===============-->
      <td align="center" class="table2">
	      <select name="companyId[]" class="companyGet companySelect" onchange="companyAjax(this.value)">
	        <option value="0">Select Company</option>
        </select> 
      </td>
<!--===========Quality Select box ===============-->
      <td align="center" class="table2">
	      <select name="qualityId[]" class="qualitySelect" onchange="qualityAjax(this.value)" />
	        <option value="0">Select Quality</option>
        </select>
      </td>
<!--===========Color Select box ===============-->
      <td align="center" class="table2">
	      <select name="colorId[]" class=" add colorSelect" >
	        <option value="0">Select Color</option>
        </select>
      </td>
       <th class="table2">Image : <input name="userfile[]" type="file" id="userfile"></th>
    </tr>
  </tbody>
  <tr>
    <td class="table1" align="center" colspan="9	" ><input type="submit" name="submitBtn" value="Submit" class="button" /></td>
  </tr>
  </table>
  </form>
  <br />
  <br />
  <table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="13"><b> Image Master</b></td>
</tr>
<tr>
  <td class="table2" NOWRAP><b></b></td>
  <td class="table2" NOWRAP><b>Item 	</b></td>
  <td class="table2" NOWRAP><b>Size </b></td>
	<td class="table2" NOWRAP><b>Company </b></td>
  <td class="table2" NOWRAP><b>Quality </b></td>
  <td class="table2" NOWRAP><b>Color  </b></td>
  <th class="table2" align="center">Image</th>
</tr>
 <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['name'] = "sec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['colorArray']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total']);
?>
<tr>
   <td class="table2" align="center"><a href="colorDelete.php?colorId=<?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['colorId'];?>
" onclick="return myFunction();"class="link"> <img src="./images/deleteIco.png"></a></td>
        <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['itemName'];?>
</td>
        <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['sizeName'];?>
</td>
        <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['companyName'];?>
</td>
        <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['qualityName'];?>
</td>
        <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['colorName'];?>
</td>
        <td class="table2" ><img src="images/img/<?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['itemImage'];?>
" height="50" width="50" ></td>
     </tr>
      <?php endfor; endif; ?>
    </table>

</body>
</html><?php }} ?>